﻿@model  IEnumerable<MVC01.Models.Category>
<div class="box categories">
    <h2>
        Danh mục sản phẩm @ViewBag.CatSelected<span></span>
    </h2>
    <div class="box-content" id="categoryContent">
        <ul>
            @foreach (var item in Model)
            {
                if (Model.Last().CatId.Equals(item))
                {
                <li class="last">
                    @Html.ActionLink(item.CatName, "Product", "Home", new { cid = item.CatId }, new { @id = "cat" + item.CatId })
                </li>
                }
                else
                {
                <li>
                    @Html.ActionLink(item.CatName, "Product", "Home", new { cid = item.CatId }, new { @id = "cat" + item.CatId })</li>
                }
            }
        </ul>
    </div>
</div>
